cmake_minimum_required(VERSION 2.8)

project( app )

find_package( Qt4 	REQUIRED )
# find_package( OpenCV 	REQUIRED )

SET(APP_NAME app)

SET(APP_HEADERS
)
SET(APP_MOC_HEADERS 
	includes/mainwindow.h
)
SET(APP_SOURCES 
	sources/main.cpp 
	sources/mainwindow.cpp
)
SET(APP_FORMS 
	# hellowindow.ui
)
SET(APP_RESOURCES 
	resources/app.qrc
)
SET(QT_USE_QTCORE	TRUE)
SET(QT_USE_QTGUI 	TRUE)

QT4_WRAP_CPP(MOC_GENERATED 	${APP_MOC_HEADERS})
QT4_WRAP_UI(FORMS_GENERATED 	${APP_FORMS})
QT4_ADD_RESOURCES(RC_GENERATED 	${APP_RESOURCES})

INCLUDE_DIRECTORIES(
       	includes
       	${CMAKE_CURRENT_BINARY_DIR}
        
	#${QT_INCLUDE_DIR}
)

INCLUDE(${QT_USE_FILE})

ADD_DEFINITIONS(
	${QT_DEFINITIONS} 
	-W -Wall 
)

add_executable(${APP_NAME}
	${APP_SOURCES}
	${APP_HEADERS}
	${APP_FORMS}		${FORMS_GENERATED}
	${APP_MOC_HEADERS}	${MOC_GENERATED}
	${APP_RESOURCES}	${RC_GENERATED}
)

target_link_libraries(${APP_NAME}
	#${OpenCV_LIBS}
	${QT_LIBRARIES}
)

#message(STATUS "QT_INCLUDE_DIR : " ${QT_INCLUDE_DIR})
#message(STATUS "QT_USE_FILE : " ${QT_USE_FILE})
#message(STATUS "QT_DEFINITIONS : " ${QT_DEFINITIONS})
#message(STATUS "QT_LIBRARIES : " ${QT_LIBRARIES})
#message(STATUS "QT_QTCORE_LIBRARIES : " ${QT_QTCORE_LIBRARIES})
#message(STATUS "QT_QTGUI_LIBRARIES : " ${QT_QTGUI_LIBRARIES})
#message(STATUS "QT_QTGUI_LIBRARY_DIR : " ${QT_LIBRARY_DIR})
